package cn.hairui.blog.mapper;

import cn.hairui.blog.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author lihairui
 * @version V1.0
 * @date: 2019/7/31 20:39
 */
@Mapper
public interface UserMapper {

    @Select("SELECT * FROM USER WHERE USERNAME=#{username}")
    User findByUsername(String username);

    @Select("SELECT * FROM USER WHERE USERNAME=#{username} AND PASSWORD=#{password} LIMIT 1")
    User findByUsernameAndPwd(String username, String password);
}
